import service from '../request';

const controller = "MenuInfo"

/**
* 
* @param {*} data 
* @returns 
*/
function Menuone() {
    return service({
        method: 'post',
        url: controller + "/menuone",
    })
}

function mymenu() {
    return service({
        method: "GET",
        url: controller + "/mymenus",
    })
}
/**
* 添加
* @param {*} data 
* @returns 
*/
function post(data:any):any {
    return service({
        method: 'post',
        url: controller,
        data: data,      
    })
}
/*
修改
*/
function put(data:any):any {
    return service({
        method: 'put',
        url: controller,
        data: data,      
    })
}
/**
* 查找单个
* @param {*} data 
* @returns 
*/
function get(id:number) {
    return service({
        method: 'get',
        url: controller+"/"+id,
        // params: data,　　　　 
      
    }) 
}

/**
* 删除
* @param {*} data 
* @returns 
*/
function del(data:any):any {
    return service({
        method: 'delete',
        url: controller,
        params: data,　　　　 
      
    }) 
}
/**
 * 分页查询
 */
function query(data: any):any {
    return service({
        method: "get",
        url: controller + "/query",
        params: data,
    })
}

export default { Menuone,  mymenu,query,post,del,put,get }